<extend name="Index/index" />

<block name="link">
    <title>Store</title>
    <meta charset="utf-8">
    <!-- <link href="__PUBLIC__/store_public/css/global.css" rel="stylesheet" type="text/css" /> -->
    <link href="__PUBLIC__/store_public/css/global_schinese.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/publicheader.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/storeheader.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/store.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/store_featured.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/buttons.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/valvefooter.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/store1.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/cart.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">

    <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/store_public/js/jquery-1.7.1.min.js"></script>
    <script src="__PUBLIC__/js/home_index/jquery-1.8.3.min.js"></script>
    
    
    <!-- <link href="__PUBLIC__/store_public/css/style.css" rel="stylesheet" type="text/css"> -->
    <style>
        .rank0{background-image: linear-gradient(rgb(176, 195, 217), rgb(38, 42, 45)), linear-gradient(rgb(176, 195, 217), rgb(38, 42, 45)); border-top-color: rgb(176, 195, 217);}
        .rank5{background-image: linear-gradient(rgb(176, 195, 217), rgb(38, 42, 45)), linear-gradient(rgb(176, 195, 217), rgb(38, 42, 45)); border-top-color: rgb(176, 195, 217);}
        .rank1{background-image: linear-gradient(rgb(75, 105, 255), rgb(38, 42, 45)), linear-gradient(rgb(75, 105, 255), rgb(38, 42, 45)); border-top-color: rgb(75, 105, 255);}
        .rank2{background-image: linear-gradient(rgb(173, 229, 92), rgb(38, 42, 45)), linear-gradient(rgb(173, 229, 92), rgb(38, 42, 45)); border-top-color: rgb(173, 229, 92);}
        .rank3{background-image:linear-gradient(rgb(136, 71, 255), rgb(38, 42, 45)), linear-gradient(rgb(136, 71, 255), rgb(38, 42, 45)); border-top-color: rgb(136, 71, 255);}
        .rank4{background-image: linear-gradient(rgb(211, 44, 230), rgb(38, 42, 45)), linear-gradient(rgb(211, 44, 230), rgb(38, 42, 45)); border-top-color: rgb(211, 44, 230);}
        .portrait{background-size: 80px 46px;background-repeat: no-repeat;width: 80px;height: 46px;padding-top: 10px;}
        .name{font-size: 18px;line-height: 22px;color: #beb7b4;margin-bottom: 6px;}
        .rarity{font-size: 18px;color: #071215;font-family: Arial;}
        .rarityCell {height: 24px;margin: 12px 0px 12px -12px;width: 304px;}
        /*传说*/
        .rarityLegendary{background: linear-gradient(to right, #8b1d98 0%,#d32ce6 36%,#d32ce6 64%,#8b1d98 100%);}
        /*神话*/
        .rarityMythical{background: linear-gradient(to right, #5b2faa 0%,#8847ff 36%,#8847ff 64%,#5b2faa 100%);}
        /*至宝*/
        .rarityArcana{background: linear-gradient(to right, #759a3e 0%,#ade55c 36%,#ade55c 64%,#759a3e 100%);}
        /*稀有*/
        .rarityRare{background: linear-gradient(to right, #273dad 0%,#395aff 36%,#395aff 64%,#273dad 100%);}
        /*普通*/
        .rarityCommon{background: linear-gradient(to right, #8694a5 0%,#b0c3d9 36%,#b0c3d9 64%,#8694a5 100%);}
    </style>

</block>

<block name="main">
    </head>

    <body class="MainBackgroundImage">
        <div class="StorePageBody" class="Hidden">
            <!-- StoreContainer start -->
            <div class="StoreContainer">
                <div class="StoreContainerBg"></div>
                <div id="StoreTabs">
                    <span id="StoreTabButtons">
                        <a href="#" id="title1" class="StoreTab NoSelect  StoreTabActive GrayButton">主打</a>
                        <a href="<{:U('Home/Store/list?list=1')}>" id="title2" class="StoreTab DarkGrayButton NoSelect StoreTabMenuButton ">英雄套装</a>
                        <a href="<{:U('Home/Store/list?list=2')}>" id="title3" class="StoreTab DarkGrayButton NoSelect StoreTabMenuButton ">
                        物品</a>
                        <a href="<{:U('Home/Store/list?list=3')}>" id="title4" class="StoreTab DarkGrayButton NoSelect StoreTabMenuButton ">职业商店</a>
                        <span class="LowerBg"></span>
                    </span>
                    <span class="StoreTabPadding"></span>
                    <div id="StoreSearchForm">
                    <form action="<{:U('Home/Store/list?list=search')}>" method="post" name="form1" id="form1">
                        <input type="text" id="StoreSearchInput" autocomplete="off" spellcheck="false" placeholder="搜索" name="search"/>
                    </form>
                    <div id="storeSearchButton" class="glyphicon glyphicon-search" style="position: absolute;top: 5px;right: 5px;width: 19px;height: 19px;background-image: url(http://cdn.dota2.com.cn/apps/dota2/images/store/icon_search.png?1);background-size: 19px 19px;background-repeat: no-repeat;pointer-events: none;font-family: Arial;"></div>
                    </div>

                    <div id="CartButton" class="NoSelect CartHeaderButton NoItems"">
                        <span id="CartButtonText" class="">
                            <div id="CartButtonTextIcon"></div>
                            <a href="<{:U('Home/Cart/index')}>">购物车</a>
                        </span>
                        </span>
                    </div>
                </div>

                <!-- ContentContainer  start -->
                <div id="ContentContainer">
                    <!-- Featured start -->
                    <div id="Featured" class="Hidden" style="display: block;">
                        <!-- 主体左半边部分 -->
                        <div class="LeftColumn" style="display:block;">
                            <div id="CarouselView" class="StoreCarousel FeaturedViewBottomPadding NoSelect">
                                <!-- 轮播图下方小圆点 -->
                                <div id="CarouselContainer" class="CarouselContainer" style="display:block;">
                                    <div id="CarouselNav" class="CarouselCells">
                                        <a href="#" class="activeSlide" id="cur1"></a>
                                        <a href="#" class="" id="cur2"></a>
                                        <a href="#" class="" id="cur3"></a>
                                    </div>
                                    <!-- 轮播图图片及内容 -->
                                    <ol class="CarouselImages" id="CarouselCycler" style="position: relative; overflow: hidden;">
                                        <li style="position: absolute; top: 0px; left: 0px; display: block; z-index: 5; opacity: 1; width: 616px; height: 446px;">
                                            <img src="" id="myImg"/>    
                                            <div class="CarouselFooter">
                                                <h1 id="sor1"></h1>
                                                <span id="sor2"></span>
                                                <span class="ItemPrice" id="sor3"></span>
                                            </div>
                                        </li>
                                    </ol>
                                </div>
                            </div>
                            <script>
                                var mark = 1;
                                var timer = setInterval(runControl, 2000);
                                runControl();
                                for(var j = 1; j < 4; j++){
                                    (function(j){
                                        $('#cur'+j).click(function(){
                                            mark = j;
                                            runControl();
                                        });
                                    })(j)
                                }

                                function runControl(){
                                    for(var i = 1; i < 4; i++){
                                        if(i == mark){
                                            $('#cur'+i).addClass('activeSlide');
                                        }else{
                                            $('#cur'+i).removeClass('activeSlide');
                                        }
                                    }
                                    if(mark == 1){
                                        $('#myImg').attr('src','__PUBLIC__/store_public/picture/journey_terrain_jj92rasjd.jpg');
                                        $('#sor1').html('大圣的新游记');
                                        $('#sor2').html('全新地图特价出售，35%折扣，截至2017年1月12日');
                                        $('#sor3').html('7800 刀币');
                                    }else if(mark == 2){
                                        $('#myImg').attr('src','__PUBLIC__/store_public/picture/monkey_king_arcana_qwedfa8.jpg');
                                        $('#sor1').html('擎天大圣捆绑包');
                                        $('#sor2').html('齐天大圣至宝捆绑包内含四款由游戏状态解锁的动态款式、自定义动作、特殊嘲讽动作、聊天表情和专属载入画面。');
                                        $('#sor3').html('21000 刀币');
                                    }else{
                                        $('#myImg').attr('src','__PUBLIC__/store_public/picture/monkey_king_announcer_jr9qw0irl.jpg');
                                        $('#sor1').html('齐天大圣播音包');
                                        $('#sor2').html('将默认播音员和连杀配音替换成传奇的齐天大圣。支持语言：英语和中文。');
                                        $('#sor3').html('3600 刀币');
                                    }
                                    mark++;
                                    if(mark > 3){
                                        mark = 1;
                                    }
                                }
                            </script>
                            <!-- 轮播图下面的商品模块 -->
                            <div class="MainFeaturedItemViewContainer FeaturedViewBottomPadding FeaturedContainer_Base" id="MainFeaturedItemViewContainer" style="height:auto;">
                                <!-- 轮播图下面的商品分类标题模块 -->
                                <div class="MiniGridNavBar" id="MiniGridNavBar" style="display:block;">
                                    <span class="MiniGridTabContainer">
                                        <a class="GrayButton MiniGridNavButton ActiveMiniGridButton" data-areaid="NewReleasesView" data-show-nav-footer="true" id="newshop">新品上架</a>
                                        <span class="MiniGridNavButtonSpacing"></span>
                                    <a class="DarkGrayButton MiniGridNavButton" data-areaid="PopularItemsView" id="hotshop">热销商品</a>
                                    <span class="MiniGridNavButtonSpacing"></span>
                                    </span>
                                    <span class="MiniGridTabPadding"></span>
                                </div>
                                <!--商品内容 每行3个 -->
                                <div id="MiniGridViews" style="display:block;">
                                    <div id="NewReleasesView">
                                        <volist name="list1" id="vo">
                                            <div data-defindex="20985" id="NR_20985" data-shouldhighlight="1" data-sourcehistory="c9" class="ItemContainerCell_Base ItemContainerCell">
                                                <div class="TagContainer_Base TagContainer">
                                                    <div class="Tag NewTag_Base">新品</div>
                                                </div>
                                                <a href="<{:U('Home/Store/detail?gid='.$vo['g_id'])}>" class="ItemImage_Base ItemImage NoSelect ItemDetailsMiniPopupBorderInactive" data-image-loaded="0">
                                                    <img class="ItemImageDropShadow" src="/Uploads/Store/<{$vo.g_icon}>"
                                                    style="opacity: 1;" />
                                                </a>
                                                <div id="myhidden" class="Hidden"><{$vo.g_rank}></div>
                                                <div class="Hidden myhiddenid"><{$vo.g_id}></div>
                                                <div class="ItemText_Base ItemText">
                                                    <div class="ItemName_Base Name">
                                                        <{$vo.g_name}>
                                                    </div>
                                                    <div class="PlayerClass">
                                                        <{$vo.g_type}>
                                                    </div>
                                                    <span class="Price"><{$vo.price}> 刀币</span>
                                                </div>
                                                <div class="HoverContentContainer_Base HoverContentContainer" style="display: none" onclick="addCart()" data-toggle="modal" data-target="#myModal">
                                                    <a class="NoSelect GreenButton BigButton HoverAddToCartButton NoColorTransition">
                                                        <img src="__PUBLIC__/store_public/picture/cart.png" class="SmallCartIcon" style="opacity: 1;margin-bottom:8px;" /><span class="ButtonPrice"><{$vo.price}> 刀币</span>
                                                    </a>
                                                </div>
                                            </div>
                                        </volist>
                                    </div>
                                </div>

                                <!-- 商品列表 热销商品 -->
                                <div id="PopularItemsView" class="Hidden">
                                    <?php $i=1 ?>
                                    <div class="ItemContainerRow">
                                        <volist name="list2" id="vo">
                                            <div data-defindex="20985" id="NR_20985" data-shouldhighlight="1" data-sourcehistory="c9" class="ItemContainerCell_Base ItemContainerCell">
                                                <div class="TagContainer_Base TagContainer">
                                                    <div class="Tag NewTag_Base">热销</div>
                                                </div>
                                                <a href="<{:U('Home/Store/detail?gid='.$vo['g_id'])}>" class="ItemImage_Base ItemImage NoSelect ItemDetailsMiniPopupBorderInactive" data-image-loaded="0">
                                                    <img class="ItemImageDropShadow" src="/Uploads/Store/<{$vo.g_icon}>"
                                                    style="opacity: 1;" />
                                                </a>
                                                <div id="myhidden" class="Hidden"><{$vo.g_rank}></div>
                                                <div class="Hidden myhiddenid"><{$vo.g_id}></div>
                                                <div class="ItemText_Base ItemText">
                                                    <div class="ItemName_Base Name">
                                                        <{$vo.g_name}>
                                                    </div>
                                                    <div class="PlayerClass">
                                                        <{$vo.g_type}>
                                                    </div>
                                                    <span class="Price"><{$vo.price}> 刀币</span>
                                                </div>
                                                <div class="HoverContentContainer_Base HoverContentContainer" style="display: none" onclick="addCart()" data-toggle="modal" data-target="#myModal">
                                                    <a class="NoSelect GreenButton BigButton HoverAddToCartButton NoColorTransition">
                                                        <img src="__PUBLIC__/store_public/picture/cart.png" class="SmallCartIcon" style="opacity: 1;margin-bottom:8px;" /><span class="ButtonPrice"><{$vo.price}> 刀币</span>
                                                    </a>
                                                </div>
                                            </div>
                                            <?php $i++; ?>
                                            <if condition="($i eq 3)">
                                                <?php $i=0 ;?>
                                    </div>
                                    <div class="ItemContainerRow">
                                        </if>
                                        </volist>
                                    </div>
                                </div>
                            </div>
                            </div>
                        </div>

                        <!-- 主体右半边部分 -->
                        <div class="RightColumn" style="display:block;" id="right">
                            <div class="SpotlightTreasureViewContainer FeaturedViewBottomPadding FeaturedContainer_Base">
                                <!-- 特色珍藏  模块 -->
                                <volist name='newlist' id='vo'>
                                    <div class="FeaturedViewHeader">
                                        <p>特色珍藏</p>
                                    </div>
                                    <div class="SpotlightView" id="SpotlightTreasureView">
                                        <div class="ItemContainerRow">
                                            <div data-defindex="11887" data-shouldhighlight="0" data-sourcehistory="d0" class="ItemContainerCell_Base ItemContainerCell">
                                                <a href="<{:U('Home/Store/detail?gid='.$vo['g_id'])}>" class="ItemImage_Base ItemImage NoSelect" data-image-loaded="0">
                                                    <img class="ItemImageDropShadow" src="/Uploads/Store/<{$vo.g_icon}>" style="opacity: 1;" /></a>
                                                <div id="myhidden" class="Hidden"><{$vo.g_rank}></div>
                                                <div class="Hidden myhiddenid"><{$vo.g_id}></div>
                                                <div class="ItemText_Base ItemText" style="display: block;">
                                                    <div class="ItemName_Base Name">
                                                        <{$vo.g_name}>
                                                    </div>
                                                    <div class="PlayerClass">
                                                        <{$vo.g_type}>
                                                    </div>
                                                    <span class="Price"><{$vo.price}> 刀币</span>
                                                </div>
                                                <div class="HoverContentContainer_Base HoverContentContainer" style="display: none" onclick="addCart()" data-toggle="modal" data-target="#myModal">
                                                    <a class="NoSelect GreenButton BigButton HoverAddToCartButton NoColorTransition">
                                                        <img src="__PUBLIC__/store_public/picture/cart.png" class="SmallCartIcon" style="opacity: 1;margin-bottom:8px;" />
                                                        <span class="ButtonPrice"><{$vo.price}> 刀币</span>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                            </div>
                            </volist>
                            <!-- 联赛模块 -->
                            <div class="TournamentsViewContainer FeaturedViewBottomPadding FeaturedContainer_Base">
                                <div class="FeaturedViewHeader">
                                    <p><a href="javascript:ChangeCategory( 3837590211, true );">联赛</a>
                                    </p>
                                </div>
                                <div class="RightColumnItemsView TournamentCondensedView" id="NewTournamentsView">
                                    <volist name="league" id="vo">
                                        <div class="ItemContainerRow">
                                            <div data-defindex="17234" id="model" data-shouldhighlight="1" data-sourcehistory="ce" class="ItemContainerCell_Base ItemContainerCell">
                                                <a href="<{:U('Home/Store/detail?gid='.$vo['g_id'])}>" class="ItemImage_Base ItemImage NoSelect ItemDetailsMiniPopupBorderInactive" data-image-loaded="0" >
                                                    <img class="ItemImageDropShadow" src="/Uploads/Store/<{$vo.g_icon}>"
                                                    style="opacity: 1;" />
                                                </a>
                                                <div id="myhidden" class="Hidden"><{$vo.g_rank}></div>
                                                <div class="Hidden myhiddenid"><{$vo.g_id}></div>
                                                <div class="ItemText_Base ItemText" style="display: block;">
                                                    <div class="ItemName_Base Name">
                                                        <{$vo.g_name}>
                                                    </div>
                                                    <div class="PlayerClass">
                                                        <{$vo.g_type}>
                                                    </div>
                                                    <span class="Price"><{$vo.price}> 刀币</span>
                                                </div>
                                                <div class="HoverContentContainer_Base HoverContentContainer" style="display: none" onclick="addCart()" data-toggle="modal" data-target="#myModal">
                                                    <a class="NoSelect GreenButton BigButton HoverAddToCartButton NoColorTransition">
                                                        <img src="__PUBLIC__/store_public/picture/cart.png" class="SmallCartIcon" style="opacity: 1;margin-bottom:8px;" /> <span class="ButtonPrice"><{$vo.price}> 刀币</span> 
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </volist>
                                </div>
                                <div class="ViewAllButtonContainer">
                                    <a href="javascript:ChangeCategory( 3837590211, true );">查看所有</a>
                                </div>
                            </div>
                            <!-- 游戏界面皮肤 载入皮肤  模块-->
                            <div class="InterfaceItemsViewContainer FeaturedViewBottomPadding FeaturedContainer_Base">
                                <div class="FeaturedViewHeader">
                                    <p><a href="javascript:ChangeCategory( 34589234, true );">游戏界面皮肤 &amp; 载入界面</a>
                                    </p>
                                </div>
                                <div class="RightColumnItemsView" id="NewInterfaceItemsView">
                                    <div class="ItemContainerRow">
                                        <volist name="suit" id="vo">
                                        <div data-defindex="20821" id="NII_20821" data-shouldhighlight="1" data-sourcehistory="cf" class="ItemContainerCell_Base ItemContainerCell">
                                            <a href="<{:U('Home/Store/detail?gid='.$vo['g_id'])}>" class="ItemImage_Base ItemImage NoSelect ItemDetailsMiniPopupBorderInactive" data-image-loaded="0">
                                                <img class="ItemImageDropShadow" src="/Uploads/Store/<{$vo.g_icon}>" style="opacity: 1;" />
                                            </a>
                                            <div id="myhidden" class="Hidden"><{$vo.g_rank}></div>
                                            <div class="Hidden myhiddenid"><{$vo.g_id}></div>
                                            <div class="ItemText_Base ItemText">
                                                <div class="ItemName_Base Name"><{$vo.g_name}></div>
                                                <div class="PlayerClass"><{$vo.g_type}></div>
                                                <span class="Price"><{$vo.price}> 刀币</span>
                                            </div>
                                            <div class="HoverContentContainer_Base HoverContentContainer" style="display: none" onclick="addCart()" data-toggle="modal" data-target="#myModal">
                                                <a class="NoSelect GreenButton BigButton HoverAddToCartButton NoColorTransition">
                                                    <img src="__PUBLIC__/store_public/picture/cart.png" class="SmallCartIcon" style="opacity: 1;margin-bottom:8px;" />
                                                    <span class="ButtonPrice"><{$vo.price}> 刀币</span>
                                                </a>
                                            </div>
                                        </div>
                                        </volist>
                                    </div>
                                </div>
                                <div class="ViewAllButtonContainer">
                                    <a href="javascript:ChangeCategory( 34589234, true );">查看所有</a>
                                </div>
                            </div>
                        </div>

                    </div>
                    <!-- Featured end -->
                </div><!-- ContentContainer  end -->

            </div><!-- StoreContainer end -->
            <div class="ValveFooter"></div>
        </div>
        <!-- StorePageBody end -->
        
        <div id="ItemDetailsMiniPopup" style="left: 474px; top: 210px; display: none;">
            <div class="name">2016年秋季珍藏 IV</div>
            <div class="SetInfo" style="display: none;">
                <div class="SetNameContainer">属于
                    <span class="SetName"></span>
                </div>
                <div class="SetCountInfo">1 /
                    <span class="SetItemCount"></span>
                </div>
            </div>
            <div class="rarityCell rarityMythical" id="rarity">
                <div class="rarity">神话</div>
            </div>
            <div class="PortraitContainer">
                <span class="UsageType">类型：<br />槽位：</span>
                <span class="UsageInfo">
                    <span class="UsageInfo_usedBy">所有英雄</span>
                <br />
                <span class="UsageInfo_Slot">无</span>
                </span>
                <div class="portrait" style="background-image: url();"></div>
            </div>
            <div class="NoticeInfo" style="display: none;">
                <div class="NoticeIcon"></div>
                <div class="NoticeText">
                    这件物品的使用次数有限。
                    <br />使用次数：&nbsp;
                    <span class="LimitedUseQuantity"></span>
                </div>
            </div>
            <div id="ItemDetailsMiniPopupDescription" style="display: none;"></div>
            <div class="ItemAttribute PrizePool" style="display: none;">
                每份门票的售出都会使总奖金增加</div>
            <div class="ItemAttribute Compendium" style="display: none;">
                互动手册已启用</div>
            <div class="ItemAttribute Fantasy" style="display: none;">梦幻联赛已启用</div>
        </div>

        <div class="izl-rmenu">
            <a class="consult" target="_blank" style="position:fixed;left:1161px;top:400px;background-image: url('/Public/store_public/picture/consult_icon.gif');background-repeat: no-repeat;background-position: center -77px;display: block;height: 76px;width: 82px;">
            <div class="phone" style="background-color: rgb(247,247,255);position: absolute;width: 160px;left: -160px;top: 0px;line-height: 73px;color: #000;font-size: 18px;text-align: center;display: none;">18130330205</div></a>
            <a class="cart" style="position:fixed;left:1161px;top:476px;background-image: url('/Public/store_public/picture/consult_icon.gif');background-repeat: no-repeat;background-position: center -154px;display: block;height: 76px;width: 82px;color: #45BDFF;"><div class="pic" style="display: none;position: absolute;left: -160px;top: -3px;width: 160px;height: 160px;background: url('/Public/store_public/picture/weixin.jpg');background-size:cover;"></div></a>
            <a href="javascript:void(0)" class="btn_top" style="display: block;"></a>
        </div>

        <!-- Modal -->
        <div class="modal fade " id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="position: fixed; z-index: 9999; top: 180px; left: 15px;">
            <div class="modal-dialog">
                <center>
                    <div class="modal-content" style="background-image: url(http://cdn.dota2.com.cn/apps/dota2/images/store/bg_modal.jpg);width: 458px;height: 216px;">
                        <div id="CartConfirmModalSuccess" style="display: block;">
                            <h2 style="margin: 0;padding: 36px 0 12px 0;font-size: 20px;font-weight: normal;color: #c6c6c6;">物品已加入购物车。</h2>
                            <p style="padding: 10px 0 13px 0;;"></p>
                            <div class="GreenButton BigButton ModalConfirmButton" onclick="CloseCartConfirmDlg();" data-dismiss="modal">继续购物</div>
                        </div>
                    </div>
                </center>
            </div>
        </div>
        <script>
            $('.consult').mouseover(function(){
                $('.phone').fadeIn();
            });

            $('.consult').mouseout(function(){
                $('.phone').fadeOut();
            });

            $('.cart').mouseover(function(){
                $('.pic').fadeIn();
            });

            $('.cart').mouseout(function(){
                $('.pic').fadeOut();
            });

            $('#StoreSearchInput').blur(function(){
                document.form1.submit();
            });

            $('.ItemContainerCell_Base').live('mouseover',function(){
                var left = $(this).offset().left;
                var top = $(this).offset().top;
                if(left < 500){
                    left = left + 211 + 'px';
                    top = top + 8 + 'px';
                }else if(left < 600){
                    left = left - 313 + 'px';
                    top = top + 8 + 'px';
                }else{
                    left = left - 313 + 'px';
                }
                $(this).children().nextAll('.ItemText_Base').css('display','none');
                    $(this).children().nextAll('.HoverContentContainer_Base').css('display','block');
                 timer=setTimeout(function(){
                    $('#ItemDetailsMiniPopup').css('left',left);
                    $('#ItemDetailsMiniPopup').css('top',top);
                    $('#ItemDetailsMiniPopup').css('display','block');
                 },400);
            });

            $('.ItemContainerCell_Base').live('mouseout',function(){
                clearTimeout(timer);
                $('#ItemDetailsMiniPopup').css('display','none');
                $(this).children().nextAll('.ItemText_Base').css('display','block');
                $(this).children().nextAll('.HoverContentContainer_Base').css('display','none');
            });

            $('.HoverContentContainer_Base').live('click', function(event) {
                var gid = $(this).prevAll('.myhiddenid').html();
                $.ajax({
                    type: 'post',
                    url: '<{:U("Home/Cart/addCart")}>',
                    data: 'gid='+gid,
                    dataType: 'json',
                    async: false,
                    success:function(msg){
                        if(msg == 'false'){
                            $('.modal-content').empty();
                            $('.modal-content').html('<h2 style="margin: 0;padding: 36px 0 12px 0;font-size: 20px;font-weight: normal;color: #c6c6c6;">请先登录~</h2><p style="padding: 10px 0 13px 0;"></p><div class="GreenButton BigButton ModalConfirmButton" data-dismiss="modal" onclick="login()">登录</div>');
                        }
                    }
                });
            });

            function login(){
                var url = "<{:U('Home/Login/index')}>";
                window.location = url;
            }
            
            $('.ItemContainerCell_Base').live('mouseover mouseout', function(event) {
                var myrank = $(this).children('#myhidden').html();
                var rank = 'rank'+myrank;
                var rarity = '';
                if(myrank == 1){myrank = '稀有';rarity = 'rarityRare';}
                else if(myrank == 2){myrank = '至宝';rarity = 'rarityArcana';}
                else if(myrank == 3){myrank = '神话';rarity = 'rarityMythical';}
                else if(myrank == 4){myrank = '传说';rarity = 'rarityLegendary';}
                else{myrank = '普通';rarity = 'rarityCommon';}
                if (event.type == 'mouseover') {
                    $(this).children('.ItemImage_Base').addClass(rank);
                    $('#ItemDetailsMiniPopup').find('#rarity').removeClass();
                    $('#ItemDetailsMiniPopup').find('#rarity').addClass(rarity);
                    $('#ItemDetailsMiniPopup').find('#rarity').addClass('rarityCell');
                    var s = $(this).find('img').attr('src');
                    $('#ItemDetailsMiniPopup').find('.portrait').css('background-image',"url("+s+")");
                    $('#ItemDetailsMiniPopup').find('.name').html($(this).find('.ItemName_Base').html());
                    $('#ItemDetailsMiniPopup').find('.UsageInfo_usedBy').html($(this).find('.PlayerClass').html());
                    $('#ItemDetailsMiniPopup').find('.rarity').html(myrank);
                } else {
                    $(this).children('.ItemImage_Base').removeClass(rank);
                    // $('#ItemDetailsMiniPopup').find('.Portrait').css('background-image','none');
                }
            })

            $('#newshop').click(function () {
                $('#NewReleasesView').removeClass('Hidden');
                $('#PopularItemsView').addClass('Hidden');
                $('#hotshop').removeClass();
                $('#hotshop').addClass('DarkGrayButton MiniGridNavButton');
                $('#newshop').removeClass();
                $('#newshop').addClass('GrayButton MiniGridNavButton ActiveMiniGridButton');
                $.ajax({
                    type: 'get',
                    url: "<{:U('Home/Store/title?title=1')}>",
                    dataType: 'json',
                    async: false,
                    success:function (msg){
                        add(msg,'new');
                    }
                });
            });

            $('#hotshop').click(function () {
                $('#NewReleasesView').addClass('Hidden');
                $('#PopularItemsView').removeClass('Hidden');
                $('#newshop').removeClass();
                $('#newshop').addClass('DarkGrayButton MiniGridNavButton');
                $('#hotshop').removeClass();
                $('#hotshop').addClass('GrayButton MiniGridNavButton ActiveMiniGridButton');
                $.ajax({
                    type: 'get',
                    url: "<{:U('Home/Store/title?title=5')}>",
                    dataType: 'json',
                    async: false,
                    success:function (msg){
                        add(msg,'hot');
                    }
                });
            });
        </script>

</block>

